Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ensure subgraphNFT handles metadata with leading zeros correctly #577

Closed
wants to merge 1 commit into from

Conversation

tmigone
Copy link
Contributor

@tmigone tmigone commented May 24, 2022

Motivation

The tokenURI being reported by SubgraphNFT contract using the tokenURI function is incorrect when the subgraph metadata hash contains leading zeroes. #576 describes the problem in detail.

Changes

  • Added test to check for this special case where subgraph metadata hash is of the form 0x00....
  • Fix in SubgraphNFT contract

Closes: #576
Signed-off-by: Tomás Migone tomas@edgeandnode.com

Closes: #576
Signed-off-by: Tomás Migone <tomas@edgeandnode.com>
@codecov
Copy link

codecov bot commented May 24, 2022

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.49%. Comparing base (6e9b7f1) to head (ff7880e).
Report is 596 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #577   +/-   ##
=======================================
  Coverage   90.49%   90.49%           
=======================================
  Files          35       35           
  Lines        1747     1747           
  Branches      290      290           
=======================================
  Hits         1581     1581           
  Misses        166      166           
Flag Coverage Δ
unittests 90.49% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tmigone tmigone added the bug Something isn't working label May 24, 2022
@pcarranzav
Copy link
Member

Since we won't be able to deploy this fix, should we close this and leave the issue open as a known bug? (We can reopen if we ever get a chance to deploy a new SubgraphNFT for whatever reason)

@pcarranzav
Copy link
Member

^ closing based on the rationale above

@pcarranzav pcarranzav closed this Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working protocol change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GNS tests fail if subgraphNFT's tokenURI has leading zeros
3 participants